import 'package:flutter/material.dart';
import 'package:get/get.dart';

import '../../../dd_core/dd_log_service.dart';
import '../../../r.dart';
import '../controllers/dd_splash_contrller.dart';

class DDSplashPage extends StatefulWidget {
  const DDSplashPage({Key? key}) : super(key: key);

  @override
  State<DDSplashPage> createState() => _DDSplashPageState();
}

class _DDSplashPageState extends State<DDSplashPage> {
  final DDSplashController _controller = DDSplashController();
  @override
  Widget build(BuildContext context) {
    return GetBuilder<DDSplashController>(
        init: _controller,
        initState: (state) {
          DDLogService().ddGa(page: "launch");
        },
        dispose: (state) {},
        builder: (controller) {
          return Scaffold(
              backgroundColor: Color(0xFFE7F6FC),
              body: SafeArea(
                  top: true,
                  child: Container(
                    width: Get.width,
                    child: Column(
                      children: [
                        Padding(
                          padding: EdgeInsetsDirectional.fromSTEB(
                              0, 140, 0, 0),
                          child: ClipRRect(
                            child: Image.asset(
                              R.assetsImagesSlice520,
                              width: Get.width,
                              height: 329,
                              fit: BoxFit.fill,
                            ),
                          ),
                        ),
                        SizedBox(
                          height: 100,
                        ),
                        Text(
                          'welcome',
                          style: TextStyle(
                            color: Color(0xFF53BFD7),
                            fontSize: 52,
                            fontFamily: 'ModakRegular',
                          ),
                        ),
                      ],
                    ),
                  )));
        });
  }
}
